xl: make libxl_uuid2string internal to libxenlight
authorGianni Tedesco <gianni.tedesco@citrix.com>
Mon, 16 Aug 2010 16:15:04 +0000 (17:15 +0100)
committerGianni Tedesco <gianni.tedesco@citrix.com>
Mon, 16 Aug 2010 16:15:04 +0000 (17:15 +0100)
commit577875ae06dbc6d4450a58233ed2ce430d2925dc
treec43b6dc6df204dd15ad960c6de840413b79dad91
parent1ecf910c9bdc713968d0e1515be865d31267619a
xl: make libxl_uuid2string internal to libxenlight

libxenlight exports a function libxl_uuid2string which is used
internally in several places but has one external caller in xl.
This means that libxl internal callers leak since they were not
expecting to have to free() the UUID since the per-api-call-gc-lifetime
patch.

Convert libxl_uuid2string to be an internal function which participates
in the callers garbage collection. Eliminate string_of_uuid() macro in
favour of "format" and "arguments" macros suitable for printf()-like
functions which are made part of the libxl API and fix-up xl callers to
use that to avoid code duplication and enhance readability.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_dom.c
tools/libxl/libxl_internal.h
tools/libxl/xl_cmdimpl.c